-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More 22.04 release process changes #217
More 22.04 release process changes #217
Conversation
This patch contains the changes that were made to help with the 22.04 release process. In particular, these were: - modifications to scripts to work with the charms that were present in the charms/ sub-directory, rather than looking in charms.txt - Modifications to the add-build-lock-file (and helpers) to work with chamcraft driven builds (being able to extract the build.lock file). - removal of the get-charms script that uses charms.txt. - Updates to the release-stable-charms, stable-branch-updates, update-stable-charms and commit-review-stable-charms scripts to work with charms that have a different release (in terms of stable libs) and branch name. (e.g. mysql charms use 'stable/yoga' libraries but have a 'stable/jammy' branch)
This visits most of the batch files and ensures that they work with what is available in the charms/ directory rather than relying on charms.txt. This is to enable release tools to be used with releases on sections. (Eventually, all the tools will work with lp-builder-config directly).
It's probably too ambitious to try to remove the 8.0.19 track as all the stable charms on focal refer to it (despite 8.0.22 being the version in focal now).
- do-batch - modified to work with charms in charms/ rather than charms.txt - add a helper that does a single review (use with do-batch-with)
This is to keep the commits for 22.04 to be consistent with just the process of doing the release for 22.04 rather than the changes to the lp-builder-config
e4a8da1
to
b697ea4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some minor comments that in no way should block this PR, it's already large enough and prone to end up getting merge conflicts, so it's better we merge it as it is and address those in subsequent PRs.
@@ -13,9 +13,14 @@ case $charm_type in | |||
source-zaza) | |||
# Build the charm. | |||
if [ ! -f src/build.lock ]; then | |||
tox -e add-build-lock-file | |||
# copy the add-build-lock file charmcraft in place | |||
cp ${_dir}/global/source-zaza/charmcraft-build-lock-file.yaml charmcraft.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, although we should have a bug/card in the backlog to make live this functionality in the charm's repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree: added #224
fi | ||
|
||
# get the url for the charm. | ||
TLP=$(grep "^project=.*" .gitreview | perl -n -e'/=(.*)\// && print $1') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have taken the awk route, but perl is fine :-)
grep "^project=.*" .gitreview | awk -F'=' '{print $2}'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My perl-foo is clearly better than my awk-foo; I couldn't see that one. I must've written too much perl in the past.
|
||
git remote | grep gerrit || { | ||
echo "Adding gerrit remote" | ||
git remote add gerrit ssh://${username}@review.openstack.org:29418/${TLP}/${CHARM} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we are already parsing the project name, maybe we should do the same with the gerrit host and port, specially considering now review.opendev.org is the host we should use instead of review.openstack.org
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's pick that up in another patch: bug opened: #225
cp -r $CHARMCRAFT_PART_BUILD/build/builds/$NAME/* $CHARMCRAFT_STAGE/ | ||
cp $CHARMCRAFT_PART_BUILD/src/build.lock $CHARMCRAFT_STAGE/build.lock | ||
override-prime: | | ||
# For some reason, the normal priming chokes on the fact that there's a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a bug for this issue?, if there is we should include the reference here so we can know when this can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is part of a bigger piece of work to use the reactive plugin instead of overriding the parts like this. I guess it's in support of charmcraft 1.6+. Bug opened: #226
REPO_URL="https://opendev.org/openstack/charm-${charm}" | ||
fi | ||
TLP=$(grep "^project=.*" charms/$charm/.gitreview | perl -n -e'/=(.*)\// && print $1') | ||
REPO_URL="https://opendev.org/${TLP}/charm-${charm}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should re-use what ever is in the .gitreview file instead of assuming the format charm-${charm}
.
This is a way we could grab the piece that goes after opendev.org
:
$ REPO=$(grep "^project=.*" .gitreview | awk -F'=' '{print $2}')
$ echo $REPO
openstack/charm-octavia.git
$ echo ${REPO%.*}
openstack/charm-octavia
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug raised #227
I don't disagree with your comments, but if it's okay to land this, then that would be great as it does move us forwards and we can continue to make changes on top of these to make release-tools better. |
Thanks for the work on this PR and charmhub migration in general :-) |
This patch contains the changes that were made to help with the 22.04
release process. In particular, these were:
the charms/ sub-directory, rather than looking in charms.txt
chamcraft driven builds (being able to extract the build.lock file).
update-stable-charms and commit-review-stable-charms scripts to work
with charms that have a different release (in terms of stable libs)
and branch name. (e.g. mysql charms use 'stable/yoga' libraries but
have a 'stable/jammy' branch)